package com.springboot.jdk.colleciton;

import java.util.LinkedHashMap;
import java.util.Map;

/**
 * @author: zr
 * @date: 2021-09-16
 */
public class LinkedHashMapDemo {

    public static void main(String[] args) {
        Map<String, String> map = new LinkedHashMap<>();
        map.put("1", "李四");
        map.put("2", "张三");
        map.put("3", "王五");
        map.put("2", "赵六");
        for (Map.Entry<String, String> entry : map.entrySet()) {
            System.out.println(entry);
        }
        // list.add(1, "麻子");
        // System.out.println(list.get(1));
        // list.remove(1);
    }
}
